const router = require("koa-router")();
const main = require("../../models");
const { ObjectId } = require("mongodb");

router.get("/detail", async ctx => {
    var { _id } = ctx.query;
    var table = await main("top250");
    var result = await table.find({ _id: ObjectId(_id) }).toArray();
    ctx.body = result;
})

module.exports = router;